From: Chong Yidong Date: Tue, 3 Nov 2009 00:39:10 +0000 (+0000) Subject: * comint.el (comint-replace-by-expanded-history-before-point): X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~9673 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e13c548c06d9d5c011eababea28541f6136e52c5;p=emacs.git * comint.el (comint-replace-by-expanded-history-before-point): Replace !! with the previous input string literally (Bug#1795). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8c718a424b..c635f6fc395 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Chong Yidong + + * comint.el (comint-replace-by-expanded-history-before-point): + Replace !! with the previous input string literally (Bug#1795). + 2009-11-02 Jay Belanger * calc/calc-forms.el (calc-date-notation): Allow a "blank string" diff --git a/lisp/comint.el b/lisp/comint.el index cd7c3f26654..5fd6d8f23a9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1277,10 +1277,7 @@ than the logical beginning of line." (message "Relative reference exceeds input history size")))) ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!")) ;; Just a number of args from the previous input line. - (replace-match - (comint-args (comint-previous-input-string 0) - (match-beginning 1) (match-end 1)) - t t) + (replace-match (comint-previous-input-string 0) t t) (message "History item: previous")) ((looking-at "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?")